package io.renren.modules.jxgk.service.impl;

import io.renren.modules.jxgk.dao.ElectiveCourseDao;
import io.renren.modules.jxgk.entity.ElectiveCourseEntity;
import io.renren.modules.jxgk.service.ElectiveCourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class ElectiveCourseServiceImpl implements ElectiveCourseService{
    @Autowired
    ElectiveCourseDao electiveCourseDao;
    public List<ElectiveCourseEntity> queryList(Map<String, Object> map){
        return electiveCourseDao.queryList(map);
    }
    public int queryTotal(Map<String, Object> map){
        return  electiveCourseDao.queryTotal(map);
    }
    public void deleteBatch(String[] termIds){
        electiveCourseDao.deleteBatch(termIds);
    }
    public void save(ElectiveCourseEntity ste){
        electiveCourseDao.save(ste);
    }
    public ElectiveCourseEntity queryObject(String index){
        return electiveCourseDao.queryObject(index);
    }
    public void update(ElectiveCourseEntity ste){
        electiveCourseDao.update(ste);
    }
    public String queryUserId(String username){
        return electiveCourseDao.queryUserId(username);
    }
    public List<String> queryUserRoleId(String username){
        return electiveCourseDao.queryUserRoleId(username);
    }

    public void insertUserRole(String userId,String roleId){
        electiveCourseDao.insertUserRole(userId,roleId);
    }
}
